class ImageWedge extends Wedge {
    constructor(options) {
        super({ ...options, type: 'image' });
        this.src = options.src;
        this.img = new Image();
        this.img.src = options.src;
    }
    _render(context) {
        if (this.img.complete) {
            context.drawImage(this.img, this.x, this.y, this.width, this.height);
        } else {
            this.img.onload = () => {
                context.drawImage(this.img, this.x, this.y, this.width, this.height);
            };
        }
    }
}
